#!/bin/bash

SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
AKASHDIR="$(dirname $SCRIPTDIR)/chain-code/akash"

[ ! -d "$AKASHDIR" ] && echo "Repositry for akash does not exist at $AKASHDIR. Try running 'make get-akash'..." && exit 1

cd $AKASHDIR
echo "Building akash binary at branch($(git branch --show-current)) tag($(git describe --tags)) commit($(git rev-parse HEAD))"
make install &> /dev/null
akash version --long
